package com.joysuch.wwyt.mh.websocket;

/**
 * @Author ZhangDong
 * @Date 2021/2/26 17:11
 */
public enum WebsocketSubType {

    MONITOR(0, "monitorPoint", "大屏监测点"),
    RISK_COMPANY(1, "riskCompany", "风险研判大屏"),
    RISK_DISTRICT(2, "riskDistrict", "风险区域"),
    CUSTOMIZE_MONITOR(3, "customizeMonitorPoint", "自定义监测点"),
    LOCATE_SCREEN(4, "locateScreen", "获取定位信息"),
    INVESTIGATION(5,"investigation","巡检排查"),
    WORKFLOW_VIEW(6,"workFlowView", "作业票图标"),
    AI_ALARM(7,"aialarm","AI报警"),
    RISK_DISTRICT_LIST(8,"riskDistrictList","大屏区域列表");

    private Integer index;
    private String subType;
    private String describe;

    WebsocketSubType(Integer index, String subType, String describe) {
        this.index = index;
        this.subType = subType;
        this.describe = describe;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public String getSubType() {
        return subType;
    }

    public void setSubType(String subType) {
        this.subType = subType;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public static boolean existSubType(String subType) {
        WebsocketSubType[] values = WebsocketSubType.values();
        for (WebsocketSubType value : values) {
            if (value.subType.equals(subType)) {
                return true;
            }
        }
        return false;
    }

}
